import requests

#登录接口对象层
#定义 ihrm 登录接口 类
class IhrmLoginApi:
    @classmethod
    def login(cls,req_data):
        resp = requests.post(url="https://ihrm-java.itheima.net/api/sys/login",
                             json=req_data)
        # {"mobile": "13800000002", "password": "929itheima.CN032@.20251018"})

        return resp


if __name__ == '__main__':
    data = {"mobile": "13800000002", "password": "929itheima.CN032@.20251021"}
    resp = IhrmLoginApi.login(data)
    print(f"登录成功:{resp.json()}")
